package com.qf.feign;

import com.qf.pojo.Customer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 千锋健哥
 */
@Component
@RequestMapping("/customerFeignFallback")
public class CustomerFeignFallback implements CustomerFeign{

    @Override
    public Customer findOne(Integer id) {
        return new Customer(0, "出现了问题", 18, "请稍后再试");
    }

    @Override
    public List<Customer> findAll() {
        return new ArrayList<>();
    }

    @Override
    public String add(Customer customer) {
        return "网络出错";
    }

    @Override
    public String update(Customer customer) {
        return "网络出错";
    }

    @Override
    public String delete(Integer id) {
        return "网络出错";
    }

}
